package com.vecspace.dicttable;
/**

 * @author: wanghua
 */
public class CodeItem { 
	private String code;
	private String name;
	private String parentCode;
	private int Status;
	private long ordnum = 99999999;
	public CodeItem(){
		
	}
	public CodeItem(String code,String name){
		this.code = code;
		this.name = name;
	} 
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	} 
	public int getStatus() {
		return Status;
	}
	public void setStatus(int status) {
		Status = status;
	}
	@Override
	public boolean equals(Object other){
		if(other == null || code == null) {
			return false;
		}
		if(!(other instanceof CodeItem)) {
			return false;
		}
		CodeItem item2 = (CodeItem)other;		
		return code.equals(item2.code);
	}
	public String getParentCode() {
		return parentCode;
	}
	public void setParentCode(String parentCode) {
		this.parentCode = parentCode;
	}
	@Override
	public int hashCode(){
		if(code == null) {
			return 0;
		}
		return code.hashCode();
	}
	public long getOrdnum() {
		return ordnum;
	}
	public void setOrdnum(long ordnum) {
		this.ordnum = ordnum;
	}

	/**配合 antdv RadioGroup.options 使用*/
	public String getLabel(){
		return this.name;
	}

	public String getValue(){
		return this.code;
	}
}
